package k.daniel.android.listview.expand;

import android.view.View;

/**
 * Created by daniel on 2015/3/18.
 */
public class BaseExpendChildHolder implements View.OnClickListener{
    public int groupPosition;
    public int childPosition;
    public View convertView;
    BaseExpendAdapter adapter;
    BaseExpendEntry group;
    public Object getChild() {
        return group.getChilds().get(childPosition);
    }

    public BaseExpendEntry getGroup() {
        return group;
    }

    public void setGroup(BaseExpendEntry group) {
        this.group = group;
    }

    public BaseExpendChildHolder() {
    }

    public void onClick(View v) {
        // TODO Auto-generated method stub
        if (mOnExpItemClickListener != null)
            mOnExpItemClickListener.OnItemClick(adapter, this, v);
        ;
    }

    public BaseExpendAdapter.OnExpItemClickListener getOnExpItemClickListener() {
        return mOnExpItemClickListener;
    }

    public void setOnExpItemClickListener(BaseExpendAdapter.OnExpItemClickListener onExpItemClickListener) {
        this.mOnExpItemClickListener = onExpItemClickListener;
    }

    public BaseExpendAdapter getAdapter() {
        return adapter;
    }

    public void setAdapter(BaseExpendAdapter adapter) {
        this.adapter = adapter;
    }

    BaseExpendAdapter.OnExpItemClickListener mOnExpItemClickListener;
}
